import Foundation

func dw_valueToDic(_ value : Any?) -> [String : Any]? {
    if let dict = value as? [String : Any] {
        return dict
    }
    if let data = value as? Data, let dict = data.dw_toDict() {
        return dict
    }
    if let data = value as? String, let dict = data.dw_toDict() {
        return dict
    }
    return nil
}
